CREATE TABLE [dbo].[Alesko_ProductFile](
	[ProductFileID] [int] IDENTITY(1,1) NOT NULL,
	[ProductID] [int] NOT NULL,
	[FileID] [int] NOT NULL,
	[DisplayOrder] [int] NOT NULL,
	[Description] [nvarchar] (100) NOT NULL
 CONSTRAINT [PK_Nop_ProductFile] PRIMARY KEY CLUSTERED 
(
	[ProductFileID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[Alesko_ProductFile]  WITH CHECK ADD  CONSTRAINT [FK_Alesko_ProductFile_Nop_File] FOREIGN KEY([FileID])
REFERENCES [dbo].[Nop_Download] ([DownloadID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Alesko_ProductFile] CHECK CONSTRAINT [FK_Alesko_ProductFile_Nop_File]
GO
ALTER TABLE [dbo].[Alesko_ProductFile]  WITH CHECK ADD  CONSTRAINT [FK_Alesko_ProductFile_Nop_Product] FOREIGN KEY([ProductID])
REFERENCES [dbo].[Nop_Product] ([ProductId])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[Alesko_ProductFile] CHECK CONSTRAINT [FK_Alesko_ProductFile_Nop_Product]
GO


